@extends('admin.layouts.wap')
@section('title', '项目列表')

@section('content')

<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body" style="padding-bottom: 15px;">
                <form class="form-inline col-md-8 header-search-nomargin" method="GET" action="{{ URL::current() }}">
                    <input type="text" class="form-control header-search-mr" name="start_time" placeholder="请输入开始时间" value="{{ date('Y-m-d H:i:s', strtotime('-90 days')) }}">
                    <input type="text" class="form-control header-search-mr" name="end_time" placeholder="请输入结束时间" value="{{ date('Y-m-d H:i:s',time()) }}">
                    <button type="submit" class="btn btn-primary form-control header-search-mr header-search-mt">立即搜索</button>
                </form>
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th scope="col">违规处罚记录id</th>
                            <th scope="col">违规原因</th>
                            <th scope="col">违规内容</th>
                            <th scope="col">违反规则</th>
                            <th scope="col">违规时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        @forelse($records as $record)
                        <tr>
                            <td>{{ $record["illegal_record_id"] }}</td>
                            <td>{{ $record["illegal_reason"] }}</td>
                            <td>{{ isset($record["illegal_content"]) ? $record["illegal_content"] : "-" }}</td>
                            <td><a href="{{ $record['rule_url'] }}">{{ $record["rule_name"] }}</a></td>
                            <td>{{ $record["create_time"] }}</td>
                        </tr>
                        @empty
                        <tr>
                            <td colspan="5">当前暂无违规记录</td>
                        </tr>
                        @endforelse
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

@endsection
